As computers and networks have grown in complexity and usefulness, businesses have become increasingly reliant on mobile computers and networks. Therefore, a failure in any particular computer may have a major impact on the productivity of a business.
The advanced power management (APM), which was published by Intel and Microsoft in 1992, defines various standard interfaces for power management of a computer. Using BIOS, the computer utilizes the APM to control and manage the power consumption for the peripheral devices. In a 16 bit/32 bit protected mode, the APM BIOS accounts for offering the subroutines used in the initialization of peripheral devices such as monitors, hard disks, floppy disks, main boards, and etc. In addition, a suitable function call table is established so as to directly control the power state of the hardware device by the operation system.
Since the APM system is mainly controlled by the BIOS and the power management function of the APM is limited, the APM system can achieve some simple power management control mechanisms, for example, powering off a given peripheral device attached to the computer after a predetermined time period (e.g. a break-even time of the peripheral device). Therefore, the power-saving efficiency of such power management system is not sufficient. On the other hand, after the computer is booted, the whole computer is dominated by the operation system, which is actually in communication with the peripheral devices. Accordingly, the control for the power management system should be transferred from the BIOS to the operation system so as to maximize the power-saving efficiency for the whole computer.
The Advanced Configuration and Power Management Interface (ACPI), which was published by Intel, Microsoft and Toshiba in Dec. 22, 1996, is a specification defining standard interfaces for hardware configuration and power management of a computer. According to the ACPI specification, the function of power management is integrated into the operation system so as to increase processing speed of the computer. This specification is also implemented on notebook computers, desktop computers, servers, etc.
During the operation phase of the ACPI, by means of ACPI driver, the operation system uses an AML interpreter to turn on/off the peripheral devices conforming to the ACPI specification. Alternatively, the peripheral devices are set to automatically turn on/off by the ACPI AML after a predetermined time period is reached. In the ACPI specification, there are two control methods to drive the CPU into a power management mode, one of which uses a system control interrupt (SCI) signal, and the other of which uses a complex table structure to directly enable the communications between the peripheral devices and the central processing unit (CPU).
Based on the objectives to which the power-saving method is to be applied, the ACPI specification defines four power modes from low to high, i.e. G (global mode), D (device mode), S (sleeping mode) and C (CPU mode). G states are system power states including G0, G1, G2/S5 and G3 states. G0 is the working state in which the CPU executes instructions and peripheral devices have their power states changed dynamically; when a peripheral device is not in use, it can enter into other power state. G1 is called the sleeping state in which no user mode threads are being executed and the system appears to be off state because the monitor is shut down. When a wakeup signal is triggered, the system resumes normal operation. G2/S5 is called the soft off state. In the G2/S5 state, the system consumes a minimal amount of power, and no user mode or system mode threads are running. Thus, it takes a prolonged time to resume the system. G3 is called the mechanical off state in which the power of the whole system is shut down and no current flows through the system. In the G3 state, the computer can only be restarted by turning on the power supply apparatus contained therein. D states are device power states including D0, D1, D2 and D3 states. D0 (fully on) is assumed to be the highest level of power consumption, and the peripheral devices are completely active under normal working. D1 offers slightly greater power saving than the D0 state. In the D2 state, some functions of the peripheral devices are forced to turn off and thus more power is saved. D3 is the off state in which the device power is fully shut down. When such device is used again, the device has to be reset. S states are sleeping states including S1, S2, S3, S4 and S5. S1 is a sleeping state in which the system can be resumed quickly and no system context is lost. S2 power state cuts power to the CPU and its cache. S3 power state shuts down almost everything except for the memory. S4 is known as a hibernation mode in which the entire system is stopped and all of the system contexts are stored to disk. In this state, the system reduces the power consumption to a minimum and the period for resuming the system operation is the longest. S5 is a soft off state that equals to G2 mode. In the S5 state, as similar to S4, the operation system does not hold any context. C states are CPU power states including C0, C1, C2 and C3. In the C0 state, the CPU executes instructions. The software in the C1 state is running normally with a shortest period for resuming the system operation. The C2 and the C3 states are low power states for the CPU, wherein C3 provides an improved power saving over C2.
When the system enters a power-saving mode, once an input/output device such as mouse or keyboard is activated, the system will generate a System Management Interrupt (SMI) signal to notify the CPU of the occurrence of a wakeup event. The clock of the CPU is then restored first. Then, the stored data is retrieved via BIOS and OS, and the interrupted working status is restored in response to a Removable Storage Manager (RSM) command.
ACPI provides a powerful power management system. Generally, the operating system, such as Microsoft WINDOWS determines the idle time of a peripheral device according to a time-out control policy. However, the power is wasted on providing electricity to the peripheral device during its idle time, and the time-out control policy is not able to efficiently power off the peripheral device during its idle time.
In view of the above-described disadvantages resulted from the conventional power management system, the applicant keeps on carving unflaggingly to develop a configuration and a method for dynamically managing the power consumption of peripheral devices through wholehearted experience and research.